// pages/index/index.js
Page({
  data: {
    person: {
      name: 'jack',
      age: 18
    }
  },
  setAge(e) {
    console.log(e);
    // e.detail就是触发事件传递的参数

    this.setData({
      person: {
        ...this.data.person,
        age: this.data.person.age + e.detail
      }
    })
  }
})